<Query Kind="Program">
  <Reference Relative="Dapper.dll">F:\Ayatta\LinqPad\SqlGenerator\Dapper.dll</Reference>
  <Reference Relative="RazorEngine.dll">F:\Ayatta\LinqPad\SqlGenerator\RazorEngine.dll</Reference>
  <Reference Relative="RazorSqlGenerator.dll">F:\Ayatta\LinqPad\SqlGenerator\RazorSqlGenerator.dll</Reference>
  <Reference Relative="System.Web.Razor.dll">F:\Ayatta\LinqPad\SqlGenerator\System.Web.Razor.dll</Reference>
  <Namespace>Dapper</Namespace>
  <Namespace>RazorEngine</Namespace>
  <Namespace>RazorSqlGenerator</Namespace>
</Query>

void Main()
{	
	Program.DatabasePrefix="Ayatta";
	RazorSqlGenerator.Table.IgnoreUpdateFields=new string[]{"Guid","CreatedBy","CreatedOn","Version"};
	var tables= Program.GetTables("server=.;database=AyattaStore;uid=sa;pwd=123456");
	
	var layout=@"F:\Ayatta\LinqPad\SqlGenerator\layout.cshtml";
	string template =@"F:\Ayatta\LinqPad\SqlGenerator\template.cshtml";
	var result=Program.Generate(tables,template,layout);
	Util.RawHtml(result).Dump();
	
	
}